package main

import (
	"fmt"
	"strings"
	"time"
)

func testLocation(str string) {
	//str := "Asia/Shanghai"
	//str := "America/Atka"

	l, err := time.LoadLocation(str)
	if err != nil {
		fmt.Println("Load location failed:", err)
		panic(err)
	}

	t, _ := time.ParseInLocation("", "", l)
	arr := strings.Split(t.String(), " ")
	if len(arr) <= 3 {
		return
	}
	fmt.Println("Name:", l.String(), "\tZone", arr[2])
	s, z := t.Zone()
	fmt.Println("Name:", s, "\tOffset:", z)
	fmt.Printf("\n")
}

func main() {
	t := time.Now()
	fmt.Println(t.Zone())

        testLocation("Asia/Hong_Kong")
        testLocation("America/Blanc-Sablon")
        testLocation("Zulu")
        testLocation("UTC")
        testLocation("WET")
        testLocation("W-SU")
	//testLocation("Pacific/Pago_Pago")
	//testLocation("Pacific/Tahiti")
	//testLocation("Pacific/Gambier")
	//testLocation("America/Los_Angeles")
	//testLocation("America/Edmonton")
	//testLocation("America/Rainy_River")
	//testLocation("America/Montreal")
	//testLocation("America/Goose_Bay")
	//testLocation("America/Godthab")
	//testLocation("America/Noronha")
	//testLocation("America/Scoresbysund")
	//testLocation("Africa/Bamako")
	//testLocation("Africa/Ndjamena")
	//testLocation("Africa/Lusaka")
	//testLocation("Africa/Addis_Ababa")
	//testLocation("Asia/Dubai")
	//testLocation("Indian/Maldives")
	//testLocation("Asia/Almaty")
	//testLocation("Asia/Phnom_Penh")
	//testLocation("Asia/Shanghai")
	//testLocation("Asia/Tokyo")
	//testLocation("Asia/Yakutsk")
	//testLocation("Pacific/Guadalcanal")
	//testLocation("Asia/Kamchatka")
}
